package ink.tiptop.func;

import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.Setter;

import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.function.Function;
import java.util.stream.Collectors;

/**
 * @author ink.tiptop.zjf
 * @Title: Ticket
 * @Package ink.tiptop.func
 * @Description:
 * @date 2020-07-23 15:15
 */
public class BigConsumer {
    public static void main(String[] args) {
        ZjfServiceRemoteViewEntity e1 = new ZjfServiceRemoteViewEntity("老王", 19);
        ZjfServiceRemoteViewEntity e2 = new ZjfServiceRemoteViewEntity("老陈", 20);

        List<ZjfServiceRemoteViewEntity> list = new ArrayList<>();
        Map<Integer, ZjfServiceRemoteViewEntity> collect = list.parallelStream().collect(Collectors.toMap(ZjfServiceRemoteViewEntity::getAge, Function.identity()));

    }
}

@Getter
@Setter
@AllArgsConstructor
class ZjfServiceRemoteViewEntity {
    private String name;
    private Integer age;

}